#!usr/bin/env python  
"""
@author:Simon
@file: objdemo01.py 
@time: 2018/01/17 
"""
# print("你好")
#
# 冬季 = 'Simon'
# print(冬季)

class Student(object):
    def __init__(self,name,score):
        # 在__init__中强制绑定  属性
        self.name = name
        self.score = score

    def print_score(self):
        print('%s:%s' %(self.name, self.score))

    def get_grade(self):
        if self.score >=90:
            return 'A'
        elif self.score >=60:
            return 'B'
        else:
            return 'C'

stu1 = Student("Simon1",99)
stu1.print_score()

stu1.name = "JackChen"
stu1.print_score()

print(stu1.name)

# print(stu1)

# def print_score(std):
#     print('%s:%s'%(std.name,std.score))
#
# print_score(stu1)

print('The student %s \'s grade is %s'%(stu1.name,stu1.get_grade()))



